"use strice";

const Controller = require('../common/shop')

class MemberRechargeOrderController extends Controller {

  tableName = 'member_recharge_order'

  async overview() {
    let data = await this.consult()
    // console.log(data);
    this.resData(0, '获取成功', data)
  }

  //时间段查询
  async timeList() {
    let { startTime, endTime } = this.ctx.request.body
    console.log(startTime, endTime);
    let result = await this.app.mysql.query('SELECT * FROM `member_recharge_order` WHERE `pay_time` BETWEEN ? AND ?', [startTime, endTime])
    console.log(result)
    this.resData(0, '获取成功', result)
  }

}

module.exports = MemberRechargeOrderController